
 <!--
  tab组件
  必传参数 loading tabData
  事件TabChange
 -->
<template>  

    <div class="tab">
      <van-tabs
        v-model="active"
        @change="TabChange"
        color="#1890FF"
        title-active-color="#1890FF"
        title-inactive-color="#191F25"
      >
        <van-tab title-style="font-size:0.15rem" v-for="(item,index) in tabData" :key="index" :title="item.title" :name="item.name" :disabled="loading"> </van-tab>
      </van-tabs>
    </div>
</template>
<script>

export default {
  name: 'Bar',
  props: {
    tabData: {
      type: Array,
      default:[],
    },
    loading:{
      type:Boolean,
      default:false
    }
  },
  data() {
    return {
        active:0,
	  }
  },
  watch: {
   
  },
  created() {
    console.log(this.tabData,'tabData')
	  
  },
  methods:{
      TabChange(v){
        this.$emit('TabChange',v)
      }
  },
  mounted() {

  }
}
</script>
<style lang="less" scoped>
.tab {
  border-bottom: 2px solid #f2f2f2;
}
</style>

